import request from '@/utils/request'
const baseUrl = '/user-function-credit/credit'
// 列表
export const list = phone => {
  return request({
    url: baseUrl + '/cardsole',
    method: 'get',
    params: {
      phone: phone,
    },
  })
}
// 欠款
export const banlan = phone => {
  return request({
    url: baseUrl + '/banlan',
    method: 'get',
    params: {
      phone: phone,
    },
  })
}
// 开卡
export const open = (form, uid) => {
  return request({
    url: baseUrl + '/open',
    method: 'post',
    data: form,
    params: {
      uid: uid,
    },
  })
}
//还款
export const overd = huan => {
  return request({
    url: baseUrl + '/overdraft',
    method: 'put',
    data: huan,
  })
}
// 借款
export const jk = jie => {
  return request({
    url: baseUrl + '/repayment',
    method: 'put',
    data: jie,
  })
}
//绑定
export const bindings = (cardnumber, id) => {
  return request({
    url: baseUrl + '/bindings',
    method: 'put',
    params: {
      cardnumber: cardnumber,
      id: id,
    },
  })
}
